Skip to content

Conversation

@Ph0tonic
Copy link
Contributor

@Ph0tonic Ph0tonic commented Jan 17, 2025

The error count in php by type is invalid. It currently only counts the number of entries in the file but an entry might have multiple occurrences.

Example:

<?php declare(strict_types = 1);

// total 1 error

$ignoreErrors = [];
$ignoreErrors[] = [
    'message' => '#^Variable \\$service in PHPDoc tag @var does not exist\\.$#',
    'count' => 2,
    'path' => __DIR__ . '/src/demo.php',
];

return ['parameters' => ['ignoreErrors' => $ignoreErrors]];

The total number of errors should be 2.

Copy link
Member

@janedbal janedbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add/adjust tests

@Ph0tonic
Copy link
Contributor Author

Here it is @janedbal 👍

@janedbal janedbal merged commit 8f920df into shipmonk-rnd:master Jan 20, 2025
13 checks passed
@janedbal
Copy link
Member

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants